1. Field of the Invention
The present invention relates generally to computer systems, and in particular, to the accelerated execution of instructions in a computer system.
2. Discussion of Related Art
Many individuals and organizations in the computer and communications industries tout the Internet as the fastest growing market on the planet. In the 1990s, the number of users of the Internet appears to be growing exponentially with no end in sight. In June of 1995, an estimated 6,642,000 hosts were connected to the Internet; this represented an increase from an estimated 4,852,000 hosts in January, 1995. The number of hosts appears to be growing at around 75% per year. Among the hosts, there were approximately 120,000 networks and over 27,000 web servers. The number of web servers appears to be approximately doubling every 53 days.
In July 1995, with over 1,000,000 active Internet users, over 12,505 usenet news groups, and over 10,000,000 usenet readers, the Internet appears to be destined to explode into a very large market for a wide variety of information and multimedia services.
In addition, to the public carrier network or Internet, many corporations and other businesses are shifting their internal information systems onto an intranet as a way of more effectively sharing information within a corporate or private network. The basic infrastructure for an intranet is an internal network connecting servers and desktops, which may or may not be connected to the Internet through a firewall. These intranets provide services to desktops via standard open network protocols which are well established in the industry. Intranets provide many benefits to the enterprises which employ them, such as simplified internal information management and improved internal communication using the browser paradigm.
Integrating Internet technologies with a company's enterprise infrastructure and legacy systems also leverages existing technology investment for the party employing an intranet. As discussed above, intranets and the Internet are closely related, with intranets being used for internal and secure communications within the business and the Internet being used for external transactions between the business and the outside world. For the purposes of this document, the term "networks" includes both the Internet and intranets. However, the distinction between the Internet and an intranet should be born in mind where applicable.
In 1990, programmers at Sun Microsystems wrote a universal programming language. This language was eventually named the JAVA programming language. JAVA and JAVA-based trademarks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. The JAVA programming language resulted from programming efforts which initially were intended to be coded in the C++ programming language; therefore, the JAVA programming language has many commonalities with the C++ programming language. However, the JAVA programming language is a simple, object-oriented, distributed, interpreted yet high performance, robust yet safe, secure, dynamic, architecture neutral, portable, and multi-threaded language.
The JAVA programming language has emerged as the programming language of choice for the Internet as many large hardware and software companies have licensed it from Sun Microsystems. The JAVA programming language and environment is designed to solve a number of problems in modern programming practice. The JAVA programming language omits many rarely used, poorly understood, and confusing features of the C++ programming language. These omitted features primarily consist of operator overloading, multiple inheritance, and extensive automatic coercions. The JAVA programming language includes automatic garbage collection that simplifies the task of programming because it is no longer necessary to allocated and free memory as in the C programming language. The JAVA programming language restricts the use of pointers as defined in the C programming language, and instead has true arrays in which array bounds are explicitly checked, thereby eliminating vulnerability to many viruses and nasty bugs. The JAVA programming language includes objective-C interfaces and specific exception handlers.
The JAVA programming language has an extensive library of routines for coping easily with TCP/IP protocol (Transmission Control Protocol based on Internet protocol), HTTP (Hypertext Transfer Protocol) and FTP (File Transfer Protocol). The JAVA programming language is intended to be used in networked/distributed environments. The JAVA programming language enabled the construction of virus-free, tamper-free systems. The authentication techniques are based on public-key encryption.
Many computer systems, including those implementing the JAVA virtual machine specification, implement instructions which require that additional data be located and retrieved prior to executing the instruction. Within the JAVA virtual machine specification, the location and retrieval of such data is referred to as resolving a constant pool entry. Instructions which require that data be located and retrieved prior to execution are hereinafter generally referred to as non-quick instructions. Locating and retrieving the data required to execute a non-quick instruction can take hundreds of cycles. It would therefore be desirable to have a method and apparatus for accelerating the execution of non-quick instructions.
A conventional method for accelerating the execution of a non-quick instruction involves the steps of (1) retrieving the original instruction code from a discrete location in program memory, (2) locating and retrieving the data required to execute the non-quick instruction, (3) modifying the original instruction code to include the retrieved data and then (4) overwriting the original instruction code at the discrete location in the program memory with the modified instruction code. The modified instruction code is subsequently executed in place of the original instruction code. This is commonly referred to as self-modifying code. One disadvantage with self-modifying code is that once the original instruction code has been modified, the original instruction code is no longer available. The unavailability of the original instruction code can hamper subsequent program debugging. Another disadvantage is that the discrete location in the memory may not have sufficient capacity to store the modified instruction code (which includes the retrieved data). In certain prior art applications, the original instruction code is stored in a read only memory (ROM). In such applications, it is not possible to overwrite the original instruction code with a modified instruction code.
It would therefore be desirable to have an instruction accelerator which accelerates the execution of non-quick instructions in a manner which overcomes the above-described shortcomings of the prior art.